package com.note.api;

import com.note.service.WorkService;
import com.note.vo.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuhuan
 * @date 2025/3/19
 */
@RestController
@RequestMapping("/work")
public class WorkController {

    private final WorkService workService;

    public WorkController(WorkService workService) {
        this.workService = workService;
    }

    @GetMapping("name")
    public AjaxResult workName() {
        return AjaxResult.success(workService.getName(1));
    }
}
